//
//  chooseStation.h
//  ElektroM
//
//  Created by Michael on 16.10.09.
//  Copyright 2009 Artgruppe inc. All rights reserved.
//

#import <UIKit/UIKit.h>

@class railwaysController;
@interface chooseStation : UIViewController <UITableViewDelegate,
											UITableViewDataSource, UISearchBarDelegate>
{
	IBOutlet UINavigationItem* toolbar;
	IBOutlet UIBarButtonItem* Back;
	
	// stations info
	int nStationsCount;
	NSString** stations;

	// iApple style:
	NSArray* 		_aiStations;
	
	// selected:
	int nSelected;
	
	IBOutlet UITableView* table;
	IBOutlet UISearchBar* searchBar;
	railwaysController* myMaster;
	bool _bSearchInProgress;
	//NSString** strStationsSearched;
	int* indexesToFoundedStations;
	int _nSearchedStations;
	bool _bCancelWasClicked;
}

@property (nonatomic, retain) IBOutlet UISearchBar* searchBar;
@property (nonatomic, retain) IBOutlet UITableView* table;
@property (nonatomic, retain) IBOutlet UINavigationItem* toolbar;
@property (nonatomic, retain) IBOutlet UIBarButtonItem* Back;

-(void)setStationsInfo:(NSString**)st withCount:(int)count andRailwaysController:(railwaysController*)controller;

-(IBAction) goBack;
-(int) getSelected;

// search delegate:
/*
-(void) resetSearch;
-(void) handleSearchForTerm:(NSString*) term;
 */
-(void)setStationsInfoAsNSArray:(NSArray*)aiSt 
		      withCount:(int)count 
	  andRailwaysController:(railwaysController*)controller;
@end
